﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Common;
using System.Text;
using System.ComponentModel;
using System.Data;
using System.Globalization;
using ResourceBlender.DAL;
using ResourceBlender.Core;

public partial class _Default : LocalPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void rptApplications_ItemDataBound(object sender, RepeaterItemEventArgs e) {
        Literal litBundles = e.Item.FindControl("litBundles") as Literal,
                litLanguages = e.Item.FindControl("litLanguages") as Literal;
        RBApplication app = e.Item.DataItem as RBApplication;
        Dictionary<string,string> bundles = DataBinder.Eval(e.Item.DataItem, "Bundles") as Dictionary<string,string>;
        if(app != null) {
            litBundles.Text = app.Bundles.Values.Aggregate((items, item) => items + ", " + item);
            litLanguages.Text = app.Languages.Aggregate((items, item) => items + ", " + Utils.GetSafeEnglishName(item));
        }
        plcNoItems.Visible = false;
    }
}
